home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Technology Seed / Mac Tech Seed Feb '97.toast / OpenDoc 1.2b2c1 / TestParts / Draw / DrawObj.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-01-01  |  4.6 KB  |  138 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        DrawPart.h
  3.  
  4.     Contains:    Interface to OSL support routines for the DrawPart
  5.  
  6.     Owned by:    Caia Grisar
  7.  
  8.     Copyright:    © 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.          <2>     9/23/96    JP        1384958: Removed stuff which is now in
  13.                                     SEUtils.h
  14.         <14>      9/4/95    TJ        Added Includes to Compile with out
  15.                                     PC-Headers.
  16.         <13>     7/27/95    eeh        1204615: add param to
  17.                                     InstallStaticCallbacks
  18.         <12>     5/18/95    eeh        1250424: add HandleRevert
  19.         <11>     4/26/95    BM        #1243574: added declarations for character
  20.                                     from null accessor, related functions
  21.         <10>     4/25/95    JP        1237938: Added ODRgstry.xh include for
  22.                                     kODStandardPartTokenType
  23.          <9>     2/22/95    eeh        1222901: add StandardPartToken
  24.          <8>      2/3/95    eeh        1217393: use new ODDesc etc
  25.          <7>     1/27/95    TJ        NP: Added forward decls.
  26.          <6>     1/25/95    eeh        1211798: move FIRSTBYTESFROMHANDLE and
  27.                                     SETFIRSTBYTESOFHANDLE
  28.          <5>     1/16/95    eeh        1211798: add FIRSTBYTESFROMHANDLE and
  29.                                     SETFIRSTBYTESOFHANDLE
  30.          <4>    11/15/94    NP        1199847-removed some object accessors and
  31.                                     event handlers.
  32.          <3>     9/29/94    RA        1189812: Mods for 68K build.
  33.          <2>     9/23/94    RR        Added forward decl of ODPart
  34.          <1>     8/30/94    NP        first checked in
  35.          <3>     12/9/93    eeh        added typeFrameProp
  36.          <2>     12/1/93    CG        Added type defs for PartProp and
  37.                                     EmbededPartProp.
  38.          <1>    11/16/93    CG        first checked in
  39.     To Do:
  40. */
  41.  
  42. #ifndef _DRAWOBJ_
  43. #define _DRAWOBJ_
  44.  
  45. #ifndef _PLFMDEF_
  46. #include "PlfmDef.h"
  47. #endif
  48.  
  49. #ifndef SOM_ODSemanticInterface_xh
  50. #include "SemtIntB.xh"
  51. #endif
  52.  
  53. //==============================================================================
  54. // Constants
  55. //==============================================================================
  56.  
  57. enum
  58. {
  59.     typeEmbededPartProp = 'eppr'
  60.     ,typePartProp         = 'pprp'
  61.     ,typeFrameProp         = 'frmp'
  62. };
  63.  
  64. //==============================================================================
  65. // Temporary constants
  66. //==============================================================================
  67.  
  68. #define cDrawPart 'draw'
  69. #define cDragPart 'drag'
  70. #define cClockPart 'clck'
  71. #define cTestPart 'test'
  72.  
  73. //==============================================================================
  74. // Forward Declaration
  75. //==============================================================================
  76.  
  77. class ODPart;
  78. class ODOSLToken;
  79. class ODDesc;
  80. class ODAppleEvent;
  81. class SIHelper;
  82.  
  83. //==============================================================================
  84. // Event Handlers and Object Accessors and Coercion Handlers.
  85. //==============================================================================
  86.  
  87.  
  88. #define ODOBJECT_ACCESSOR_PARAMS    ODPart*                part,                \
  89.                                     DescType            desiredClass,        \
  90.                                     ODOSLToken*            container,            \
  91.                                     DescType            containerClass,        \
  92.                                     DescType            form,                \
  93.                                     ODDesc*                selectionData,        \
  94.                                     ODOSLToken*            value,                \
  95.                                     ODSLong                refCon                \
  96.  
  97. static pascal ODError GetPropertyFromNULL(ODOBJECT_ACCESSOR_PARAMS);
  98. static pascal ODError GetPartFromNULL(ODOBJECT_ACCESSOR_PARAMS);
  99. static pascal ODError GetPropertyFromPart(ODOBJECT_ACCESSOR_PARAMS);
  100. static pascal ODError GetCharFromNULL(ODOBJECT_ACCESSOR_PARAMS);
  101. static pascal ODError GetWildcardFromPart(ODOBJECT_ACCESSOR_PARAMS);
  102. static pascal ODError GetWildcardFromList(ODOBJECT_ACCESSOR_PARAMS);
  103.  
  104. #define ODEVENT_HANDLER_PARAMS        ODPart*            part,            \
  105.                                     ODAppleEvent*    message,        \
  106.                                     ODAppleEvent*    reply,            \
  107.                                     ODSLong            handlerRefcon    \
  108.  
  109. static pascal ODError HandleSetData(ODEVENT_HANDLER_PARAMS);
  110. static pascal ODError HandleGetData(ODEVENT_HANDLER_PARAMS);
  111. static pascal ODError HandleRevert(ODEVENT_HANDLER_PARAMS);
  112. static pascal ODError HandleCreate(ODEVENT_HANDLER_PARAMS);
  113. static pascal ODError HandleMove(ODEVENT_HANDLER_PARAMS);
  114. static pascal ODError HandleMeow(ODEVENT_HANDLER_PARAMS);
  115.  
  116.  
  117. static pascal ODError CoerceList2RGB(ODPart* thisPart, AEDesc* from, DescType toType,
  118.                             ODSLong /*refcon*/, AEDesc* result);
  119.  
  120. static pascal ODError CoerceDPElemToChar(ODPart* thisPart, AEDesc* from, DescType toType,
  121.                             ODSLong /*refcon*/, AEDesc* result);
  122.  
  123. static pascal ODError DrawCompare(ODPart* thePart, DescType oper,
  124.         ODOSLToken* obj1, ODOSLToken*    obj2, ODBoolean* result,
  125.         ODSLong refCon);
  126.  
  127. static pascal ODError DrawCount(ODPart* thePart, DescType desiredType,
  128.         DescType containerClass, ODOSLToken* container,
  129.         ODSLong* result, ODSLong refCon);
  130. static pascal ODError DrawDisposeToken(ODPart* thePart, ODOSLToken* unneededToken,
  131.         ODSLong refCon);
  132.  
  133. void InstallStaticCallbacks( ODSemanticInterface* semtIntf,
  134.         SIHelper* helper, ODSession* session );
  135. ODBoolean CompareDPElemsAndChars( AEDesc* aDesc, AEDesc* bDesc );
  136.  
  137. #endif // _DRAWOBJ_
  138.